import type { Metadata } from "next";
import style from "./index.module.scss";
import Detail from "./Detail";
import Header from "@/app/components/Header";
import Footer from "@/app/components/Footer";
import { getCvTemp } from "@/service";

export const metadata: Metadata = {};

export default async function Home({ params }) {
  const { id } = params;
  const res = await getCvTemp({ id });
  let detail: any = {};
  if (res.code === 200) {
    detail = res.data || { content: {} };
  }
  return (
    <>
      <Header current="muban" style={{ background: "#fff" }} />
      <main className={style.main}>
        <Detail detail={detail}></Detail>
        <Footer />
      </main>
    </>
  );
}
